package com.javasm.crm.controller.marketingActivity;


import com.javasm.crm.common.http.AxiosResult;
import com.javasm.crm.domin.entity.marketingActivity.GoodsInfo2;
import com.javasm.crm.domin.entity.marketingActivity.clinetClaim.findGood;
import com.javasm.crm.service.marketingActivity.GoodsInfoService2;
import com.javasm.crm.utils.page.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author llyp
 * @since 2021-07-16
 */
@RestController
@RequestMapping("goodsinfo2")
public class GoodsInfoController {

    @Autowired
    private GoodsInfoService2 goodsInfoService2;

    /**
     * 分页条件查询商品
     */
    @GetMapping("findGood")
    public AxiosResult<PageResult<GoodsInfo2>> find(findGood findGood){

        System.out.println("页面传过来的值====》" +findGood);

        PageResult<GoodsInfo2> pageResult = goodsInfoService2.ConditionFindPage(findGood);

        return AxiosResult.success(pageResult);
    }


}
